package cn.gok.oop;

abstract class M{
    public void test(){

    }
    public abstract void test2();
}
class MC extends M{

    @Override
    public void test2() {

    }
}

public class 抽象类 {
    public static void main(String[] args) {
        M m = new MC();
        m.test2();

        M m1 = new M() {
            @Override
            public void test2() {

            }
        };
        m1.test2();
    }
}
